<div ng-controller="storeinfo as gt">
	<section class="content-header">
		<h1>
			{{title}}<small></small>
		</h1>
	</section>
	<section class="content">
		<div class="box box-default">
			<div class="col-md-12">
				<div class="box-body" >
					<alertdanger></alertdanger>
					<alertsuccess></alertsuccess>
					<form role="form">
						<div class="box-body">

							<div class="form-group">
								<label>店铺名称</label>
								<input maxlength="45" required="required"
														 ng-model="storename" class="form-control" type="text"
														 placeholder="请输入店铺名称"  value="" >
							</div>
							<div class="form-group">
								<label>经营地址</label> <input maxlength="100" required="required"
															  ng-model="address" class="form-control" type="text"
															  placeholder="请输入经营地址" value="">
							</div>
							<div class="form-group">
								<label>客服电话</label> <input maxlength="20" required="required"
															  ng-model="telno" class="form-control" type="text"
															  placeholder="请输入客服电话" value="">
							</div>
							<div class="form-group">
								<label>邮箱</label> <input maxlength="100" required="required"
														   ng-model="email" class="form-control" type="text"
														   placeholder="请输入邮箱" value="">
							</div>
							<div class="form-group">
								<label>店铺简介</label>
								<textarea ng-model="des" class="form-control" rows="8" placeholder="请输入店铺简介"></textarea>
							</div>
							<div class="form-group">
								<label>经营者</label> <input maxlength="45" required="required"
														   ng-model="master" class="form-control" type="text"
														   placeholder="请输入经营者" value="">
							</div>
							<div class="form-group">
								<label>经营者手机号</label> <input maxlength="45" required="required"
														  ng-model="mobile" class="form-control" type="text"
														  placeholder="请输入经营者手机号" value="">
							</div>
							<div class="form-group">
								<label>经营者身份证</label> <input maxlength="45" required="required"
														  ng-model="idcard" class="form-control" type="text"
														  placeholder="请输入经营者身份证" value="">
							</div>
							<div class="form-group">
								<label>上传店铺图标</label>
								<div ngf-drop ngf-select ng-model="rmainfiles" class="drop-box"
									 ngf-drag-over-class="'dragover'" ngf-multiple="true"
									 ngf-allow-dir="true" accept="image/*" ngf-pattern="'image/*'">
									<button class="btn btn-default btn-block btn-sm">选择文件</button>
									<div ngf-no-file-drop>File Drag/Drop is not supported for
										this browser</div>
								</div>
								<div class='box-body'>
									<div class="progress progress-sm active">
										<div
												class="progress-bar progress-bar-success progress-bar-striped"
												role="progressbar" aria-valuenow="0" aria-valuemin="0"
												aria-valuemax="100" style="width: {{rmainprogress}}%">
											<span class="sr-only">20% Complete</span>
										</div>
									</div>
									<div ng-repeat="img in allrmainfiles">
										<div ng-if="img.isCloudImg">
											<div class="alert alert-success alert-dismissable">
												<button ng-click="removeallrmainfiles($index)" type="button" class="close"
														data-dismiss="alert" aria-hidden="true">&times;</button>

												<img class="img-responsive pad"
													 ng-src="{{img.normalfilepath}}" alt="Photo">
												<div ng-if="img.compressfilepath!=null">
													<img
															class="img-responsive pad" ng-src="{{img.compressfilepath}}"
															alt="Photo">
												</div>

											</div>
										</div>
										<div ng-if="!img.isCloudImg">
											<div class="alert alert-success alert-dismissable">
												<button ng-click="removeallrmainfiles($index)" type="button" class="close"
														data-dismiss="alert" aria-hidden="true">&times;</button>

												<img class="img-responsive pad"
													 ng-src="{{img.basepath+img.normalfilepath}}" alt="Photo">
												<div ng-if="img.compressfilepath!=null">
													<img class="img-responsive pad"
														 ng-src="{{img.basepath+img.compressfilepath}}" alt="Photo">
												</div>
											</div>
										</div>
									</div>
								</div>
							</div>



							<div class="form-group">
								<label>公司名称</label> <input maxlength="100" required="required"
															  ng-model="companyname" class="form-control" type="text"
															  placeholder="请输入公司名称" value="">
							</div>
							<div class="form-group">
								<label>公司统一社会信用代码</label> <input maxlength="100" required="required"
														   ng-model="companycode" class="form-control" type="text"
														   placeholder="请输入公司统一社会信用代码" value="">
							</div>
							<div class="form-group">
								<label>上传营业执照</label>
								<div ngf-drop ngf-select ng-model="rfiles" class="drop-box"
									 ngf-drag-over-class="'dragover'" ngf-multiple="true"
									 ngf-allow-dir="true" accept="image/*" ngf-pattern="'image/*'">
									<button class="btn btn-default btn-block btn-sm">选择文件</button>
									<div ngf-no-file-drop>File Drag/Drop is not supported for
										this browser</div>
								</div>
								<div class='box-body'>
									<div class="progress progress-sm active">
										<div
												class="progress-bar progress-bar-success progress-bar-striped"
												role="progressbar" aria-valuenow="0" aria-valuemin="0"
												aria-valuemax="100" style="width: {{rprogress}}">
											<span class="sr-only">20% Complete</span>
										</div>
									</div>
									<div ng-repeat="img in allrfiles">
										<div ng-if="img.isCloudImg">
											<div class="alert alert-success alert-dismissable">
												<button ng-click="removeallrfiles($index)" type="button" class="close"
														data-dismiss="alert" aria-hidden="true">&times;</button>

												<img class="img-responsive pad"
													 ng-src="{{img.normalfilepath}}" alt="Photo">
												<div ng-if="img.compressfilepath!=null">
													<img
															class="img-responsive pad" ng-src="{{img.compressfilepath}}"
															alt="Photo">
												</div>

											</div>
										</div>
										<div ng-if="!img.isCloudImg">
											<div class="alert alert-success alert-dismissable">
												<button ng-click="removeallrfiles($index)" type="button" class="close"
														data-dismiss="alert" aria-hidden="true">&times;</button>

												<img class="img-responsive pad"
													 ng-src="{{img.basepath+img.normalfilepath}}" alt="Photo">
												<div ng-if="img.compressfilepath!=null">
													<img class="img-responsive pad"
														 ng-src="{{img.basepath+img.compressfilepath}}" alt="Photo">
												</div>
											</div>
										</div>
									</div>
								</div>
							</div>

							<div class="form-group">
								<label> <input type="radio" ng-model="isreviewed"
											   ng-value="1" class="flat-red" ng-checked="true">通过审核
								</label> <label> <input type="radio" ng-model="isreviewed"
														ng-value="0" class="flat-red">未通过审核
							</label>

							</div>

							<div class="form-group">
								<label> <input type="radio" ng-model="status"
											   ng-value="1" class="flat-red" ng-checked="true"> 启用
								</label> <label> <input type="radio" ng-model="status"
														ng-value="0" class="flat-red"> 禁用
							</label>

							</div>
						</div>
						<div class="box-footer">
							<button ng-show="savebtn.show" type="button"
									class="btn btn-primary" ng-click="save();">保存</button>
							<button ng-show="updatebtn.show" type="button"
									class="btn btn-primary" ng-click="update();">更新</button>
						</div>
					</form>
				</div>
			</div>
			<div class="box-footer"></div>
		</div>
	</section>
</div>
